- connect
NetConnectStatus connect(NetIPAddress ip, void delegate(INetwork) onConnect, uint id)
Undocumented in source. Be warned that the author may not have intended to support it.
- disconnect
void disconnect()
Undocumented in source. Be warned that the author may not have intended to support it.
- freeBuffer
void freeBuffer(NetBuffer* b)
Make that buffer available inside the buffer pool and saves memory
- getCompletedBuffer
NetBuffer* getCompletedBuffer()
WARNING: It is important to call freeBuffer at some time since getting the buffer won't remove it from the queue
- getConnectInfo
NetConnectInfo getConnectInfo()
Undocumented in source. Be warned that the author may not have intended to support it.
- getConnectionSelfID
uint getConnectionSelfID()
Undocumented in source. Be warned that the author may not have intended to support it.
- getData
bool getData()
Only returns true if the buffer has been completely loaded by the size expected by the package.
- getDataAsType
T getDataAsType()
Gets the data that is in front of queue and converts the data to the expected one.
The correct usage of this function is to use it after getData().
If it has no data, an exception will be thrown
- getNetInterfaceType
NetInterface getNetInterfaceType()
Undocumented in source. Be warned that the author may not have intended to support it.
- isHost
bool isHost()
Undocumented in source. Be warned that the author may not have intended to support it.
- sendDataRaw
void sendDataRaw(ubyte[] data)
Undocumented in source. Be warned that the author may not have intended to support it.
- status
NetConnectStatus status()
Undocumented in source. Be warned that the author may not have intended to support it.
- targetConnectionID
uint targetConnectionID()
Undocumented in source. Be warned that the author may not have intended to support it.
- targetConnectionID
void targetConnectionID(uint id)
Undocumented in source. Be warned that the author may not have intended to support it.
- connect
NetConnectStatus connect(NetIPAddress ip, void delegate(INetwork) onConnect, uint id)
- getConnectionSelfID
uint getConnectionSelfID()
Gets ID for that network connection. It can't change over its lifetime
- targetConnectionID
void targetConnectionID(uint id)
Sets that network connection connected to the specified ID
- targetConnectionID
uint targetConnectionID()
Undocumented in source.
- isHost
bool isHost()
Undocumented in source.
- status
NetConnectStatus status()
Returns whether it has got any data
- getNetInterfaceType
NetInterface getNetInterfaceType()
Undocumented in source.
- getConnectInfo
NetConnectInfo getConnectInfo()
Undocumented in source.
- getData
bool getData()
Returns if there is any data available to take
- sendDataRaw
void sendDataRaw(ubyte[] data)
Sends the data without modifying it further. It is called like that since it will be able to overload with templates
- getCompletedBuffer
NetBuffer* getCompletedBuffer()
WARNING: It is important to call freeBuffer at some time since getting the buffer won't remove it from the queue
This function must only be called after getData() returns true.
- freeBuffer
void freeBuffer(NetBuffer* buffer)
Make that buffer available inside the buffer pool and saves memory
- sendData
void sendData(T data)
Due to performance reasons, toNetworkBytes and toBytes needs to be in api instead of back implementation.
This allows to use non-allocating memory when sending data.
Keep in mind that the data is converted to big endian before being sent.
- withServerTarget
void withServerTarget(void delegate() dg)
Undocumented in source. Be warned that the author may not have intended to support it.
- sendDataToServer
void sendDataToServer(T data)
Undocumented in source. Be warned that the author may not have intended to support it.
- disconnect
void disconnect()
Undocumented in source.
- isConnected
bool isConnected()
Undocumented in source. Be warned that the author may not have intended to support it.